
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Go 语言基础语法 · itcode</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="wangmaolin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Go语言数据类型.html" />
    
    
    <link rel="prev" href="Go语言结构.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://itcode.wiki" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    Go语言学习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="Go语言环境安装.html">
            
                <a href="Go语言环境安装.html">
            
                    
                    Go 语言环境安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="Go语言结构.html">
            
                <a href="Go语言结构.html">
            
                    
                    Go 语言结构
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.3" data-path="Go语言基础语法.html">
            
                <a href="Go语言基础语法.html">
            
                    
                    Go 语言基础语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="Go语言数据类型.html">
            
                <a href="Go语言数据类型.html">
            
                    
                    Go 语言数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="Go语言变量&变量声明.html">
            
                <a href="Go语言变量&变量声明.html">
            
                    
                    Go 语言变量 & 变量声明
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Go 语言基础语法</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x884C;&#x5206;&#x9694;&#x7B26;"><a name="&#x884C;&#x5206;&#x9694;&#x7B26;" class="plugin-anchor" href="#&#x884C;&#x5206;&#x9694;&#x7B26;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x884C;&#x5206;&#x9694;&#x7B26;</h1>
<p>&#x5728; Go &#x7A0B;&#x5E8F;&#x4E2D;&#xFF0C;<strong><em>&#x4E00;&#x884C;&#x4EE3;&#x8868;&#x4E00;&#x4E2A;&#x8BED;&#x53E5;&#x7ED3;&#x675F;&#x3002;&#x6BCF;&#x4E2A;&#x8BED;&#x53E5;&#x4E0D;&#x9700;&#x8981;&#x50CF; C &#x5BB6;&#x65CF;&#x4E2D;&#x7684;&#x5176;&#x5B83;&#x8BED;&#x8A00;&#x4E00;&#x6837;&#x4EE5;&#x5206;&#x53F7; ; &#x7ED3;&#x5C3E;</em></strong>&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x4E9B;&#x5DE5;&#x4F5C;&#x90FD;&#x5C06;&#x7531; Go &#x7F16;&#x8BD1;&#x5668;&#x81EA;&#x52A8;&#x5B8C;&#x6210;&#x3002;</p>
<p>&#x5982;&#x679C;&#x4F60;&#x6253;&#x7B97;&#x5C06;&#x591A;&#x4E2A;&#x8BED;&#x53E5;&#x5199;&#x5728;&#x540C;&#x4E00;&#x884C;&#xFF0C;&#x5B83;&#x4EEC;&#x5219;&#x5FC5;&#x987B;&#x4F7F;&#x7528; ; &#x4EBA;&#x4E3A;&#x533A;&#x5206;&#xFF0C;&#x4F46;&#x5728;&#x5B9E;&#x9645;&#x5F00;&#x53D1;&#x4E2D;&#x6211;&#x4EEC;&#x5E76;&#x4E0D;&#x9F13;&#x52B1;&#x8FD9;&#x79CD;&#x505A;&#x6CD5;&#x3002;</p>
<p>&#x4F8B;&#xFF1A;</p>
<pre><code>fmt.Println(&quot;Hello, World!&quot;)
fmt.Println(&quot;&#x83DC;&#x9E1F;&#x6559;&#x7A0B;&#xFF1A;runoob.com&quot;)
</code></pre><h1 id="go-&#x4EE3;&#x7801;&#x4E2D;&#x4F1A;&#x4F7F;&#x7528;&#x5230;&#x7684;-25-&#x4E2A;&#x5173;&#x952E;&#x5B57;&#x6216;&#x4FDD;&#x7559;&#x5B57;&#xFF1A;"><a name="go-&#x4EE3;&#x7801;&#x4E2D;&#x4F1A;&#x4F7F;&#x7528;&#x5230;&#x7684;-25-&#x4E2A;&#x5173;&#x952E;&#x5B57;&#x6216;&#x4FDD;&#x7559;&#x5B57;&#xFF1A;" class="plugin-anchor" href="#go-&#x4EE3;&#x7801;&#x4E2D;&#x4F1A;&#x4F7F;&#x7528;&#x5230;&#x7684;-25-&#x4E2A;&#x5173;&#x952E;&#x5B57;&#x6216;&#x4FDD;&#x7559;&#x5B57;&#xFF1A;"><i class="fa fa-link" aria-hidden="true"></i></a>Go &#x4EE3;&#x7801;&#x4E2D;&#x4F1A;&#x4F7F;&#x7528;&#x5230;&#x7684; 25 &#x4E2A;&#x5173;&#x952E;&#x5B57;&#x6216;&#x4FDD;&#x7559;&#x5B57;&#xFF1A;</h1>
<pre><code>break     default     func     interface     select
case     defer     go     map     struct
chan     else     goto     package     switch
const     fallthrough     if     range     type
continue     for     import     return     var
</code></pre><h1 id="go-&#x8BED;&#x8A00;&#x8FD8;&#x6709;-36-&#x4E2A;&#x9884;&#x5B9A;&#x4E49;&#x6807;&#x8BC6;&#x7B26;&#xFF1A;"><a name="go-&#x8BED;&#x8A00;&#x8FD8;&#x6709;-36-&#x4E2A;&#x9884;&#x5B9A;&#x4E49;&#x6807;&#x8BC6;&#x7B26;&#xFF1A;" class="plugin-anchor" href="#go-&#x8BED;&#x8A00;&#x8FD8;&#x6709;-36-&#x4E2A;&#x9884;&#x5B9A;&#x4E49;&#x6807;&#x8BC6;&#x7B26;&#xFF1A;"><i class="fa fa-link" aria-hidden="true"></i></a>Go &#x8BED;&#x8A00;&#x8FD8;&#x6709; 36 &#x4E2A;&#x9884;&#x5B9A;&#x4E49;&#x6807;&#x8BC6;&#x7B26;&#xFF1A;</h1>
<pre><code>append     bool     byte     cap     close     complex     complex64     complex128     uint16
copy     false     float32     float64     imag     int     int8     int16     uint32
int32     int64     iota     len     make     new     nil     panic     uint64
print     println     real     recover     string     true     uint     uint8     uintptr
</code></pre><footer class="page-footer"><span class="copyright">Copyright &#xA9; wml 2018 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-07-08 14:58:09
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Go语言结构.html" class="navigation navigation-prev " aria-label="Previous page: Go 语言结构">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Go语言数据类型.html" class="navigation navigation-next " aria-label="Next page: Go 语言数据类型">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Go 语言基础语法","level":"1.2.3","depth":2,"next":{"title":"Go 语言数据类型","level":"1.2.4","depth":2,"path":"category/go/Go语言数据类型.md","ref":"category/go/Go语言数据类型.md","articles":[]},"previous":{"title":"Go 语言结构","level":"1.2.2","depth":2,"path":"category/go/Go语言结构.md","ref":"category/go/Go语言结构.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-pro","toggle-chapters","splitter","donate","github","edit-link","advanced-emoji","tbfed-pagefooter","simple-page-toc","baidu","changyan","anchors","sitemap-general","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy wml 2018","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://gitee.com/wmlhub/gitbook/tree/master"},"livereload":{},"simple-page-toc":{"maxDepth":3,"skipFirstH1":false},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["gitbook-use"]},"donate":{"alipay":"","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://itcode.wiki"},"changyan":{"appid":"cytowLiqM","conf":"the conf in the code generate by changyan"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"sitemap":{"hostname":"https://wmlhub.gitee.io/gitbook/"},"baidu":{"token":"084b900a1e26f6bae60e09d18e3aa455"},"advanced-emoji":{"embedEmojis":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":true,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit This Page","base":"https://gitee.com/wmlhub/gitbook/tree/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"wangmaolin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"itcode","language":"zh-hans","links":{"sidebar":{"Home":"http://itcode.wiki"}},"gitbook":"3.2.3","description":"记录自己日常学习总结"},"file":{"path":"category/go/Go语言基础语法.md","mtime":"2018-07-08T06:58:09.406Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-07-08T07:27:40.150Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-baidu/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

